package com.skeryl.sqlite.dao;

import android.database.sqlite.SQLiteDatabase;

public class DBO
{
	private SQLiteDatabase checkDB = null;
	private static final int VERSION = 1;
	private static String DB_PATH = "/data/data/com.skeryl.sqlite.activity/databases/";
	private static final String DB_NAME = "data.db";
	private static final String debug_error = "database error";
	private SQLiteDatabase db;

	public SQLiteDatabase getDatabase()
	{
		checkDB = SQLiteDatabase.openDatabase(DB_PATH + DB_NAME, null, SQLiteDatabase.OPEN_READONLY);

		if (checkDB != null)
		{
			return checkDB;
		} else
		{
			db.execSQL("create table t_chapter (sid integer primary key,title varchar(30),content varchar(200))");
			return db;
		}
	}
}
